// 1.下载并引入vue-router
import VueRouter from "vue-router"
import Vue from "vue"
import Home from "@/pages/Home"
import Login from "@/pages/Login"

// 2.应用路由插件
Vue.use(VueRouter)


// 3.创建路由器对象，并在内部配置模式和路由表
const router = new VueRouter({
    mode: "history",
    routes: [{
        path: "/home",
        component: Home,
    }, {
        path: "/login",
        component: Login,
    }]
})

// 4.暴露
export default router